home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 4861 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  963 b 

  1. Path: news.mdh.se!not-for-mail
  2. From: dat95pkn@idt.mdh.se (Peter Karlsson)
  3. Newsgroups: comp.sys.cbm
  4. Subject: Scanning strings under BASIC, avoiding INPUT "?"
  5. Date: 31 Mar 1996 15:28:48 +0200
  6. Organization: Maelardalens Hoegskola
  7. Sender: dat95pkn@bilbo.mdh.se
  8. Message-ID: <NW096NR.8315dd3e8.dat95pkn@idt.mdh.se>
  9. NNTP-Posting-Host: bilbo.mdh.se
  10. X-Mailer: NewsWave V0.96NR at 2.204/145.42
  11.  
  12. Joerg Bleimann wrote on Wed 27 Mar 1996 at 20:49:
  13.  
  14.  JB> How can I search the whole string for empties (" ") to redefine 
  15.  JB> the part right from the empty as a new string? 
  16.  
  17.  FOR I=1 TO LEN(A$) : IF MID$(A$, I, 1) <> " " THEN NEXT
  18.  
  19. will give the place of the space in I, and if there is none, the number of
  20. characters in A$ plus one.
  21.  
  22.  JB> Are there any ways to get rid of the question mark using BASIC on 
  23.  JB> the C 64?
  24.  
  25.  OPEN 1,0 : INPUT#1, A$ : CLOSE 1
  26.  
  27. will work for that one.
  28.  
  29. \\//
  30. Peter - dat95pkn@idt.mdh.se - http://www.mds.mdh.se/~dat95pkn
  31.       - Fido 2:204/145.42 
  32.